require('../../app_api/models/db');
var hisDao = require('../../app_api/dao/hospital.dao.js');

var testData = {
  "hcode": "JL001",
  "name": "吉大一院",
  "address": "平治街2233",
  "gpsinfo": "88.32,41.22",
  "introduction": "三级级医院"
};

hisDao.getHospitalList(null,20,function(err,rows){
  console.log('rows.length=',rows.length);
  if (err) {
    console.log(err);
    //res.status(400).json(err);
  }
  //res.status(200).json(rows);
  console.log(JSON.stringify(rows,null,2));
  process.exit(0);
});

/*
hisDao.createHospital(testData, function(err, hospital) {
  console.log('callback over.');
  if(err) {
    console.log(err);    
    return;
  }
  console.log(JSON.stringify(hospital,null,2));
  process.exit(0);
});//*/



